<template>
	<view class="proitem" @click="navto(`/pages/points/goodDetail?gid=${info.goods_id}&id=`+info.id)">
		<image :src="$getImg(info.image)" class="proitem__pic" mode=""></image>
		<view class="proitem__info">
			<view class="proitem__name">
				{{info.name}}
			</view>
			<view class="u-flex u-flex-y-center">
				<view class="proitem__price">
					{{info.score}}
				</view>
				<!-- <view class="proitem__old">
					￥{{info.old_price}}
				</view> -->
			</view>
			<view class="u-flex u-flex-y-center">
				<view class="proitem__tag">
					库存{{info.num}}
				</view>
				<view class="proitem__tag tag1">
					销量	{{info.salenum}}
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		name:"proitem",
		props: {
			info: {
				type: Object,
				default: function() {
					return {
						id: '',
						goods_id: '',
						name: '',
						num: '',
						score: '',
						image: '',
					};
				}
			},
		
		},
		data() {
			return {
				
			};
		}
	}
</script>

<style lang="scss">
.proitem{
	width: 48.5%;
	border-radius: 30rpx;
	overflow: hidden;
	margin-bottom: 21rpx;
	&__pic{
		width: 100%;
		height: 344rpx;
		background: #D9D9D9;
		z-index: 1;
	}
	&__info{
		background: #FFFFFF;
		margin-top: -4px;
		padding: 20rpx;
	}
	&__name{
		font-family: PingFang-SC, PingFang-SC;
		font-weight: 800;
		font-size: 28rpx;
		color: #181818;
		line-height: 28rpx;
		margin-bottom: 24rpx;
	}
	&__price{
		font-family: PingFang-SC, PingFang-SC;
		font-weight: bold;
		font-size: 32rpx;
		color: #FD3C33;
		line-height: 32rpx;
		&::after{
			content: "积分";
			font-size: 24rpx;
			margin-left: 4rpx;
		}
	}
	&__old{
		font-family: PingFang-SC, PingFang-SC;
		font-weight: 500;
		font-size: 22rpx;
		color: #919191;
		line-height: 24rpx;
		text-decoration-line: line-through;
		margin-left: 6rpx;
	}
	&__tag{
		padding: 0 8rpx;
		line-height: 34rpx;
		background:rgba(69, 196, 123, .1);
		border-radius: 5rpx 5rpx 5rpx 5rpx;
		font-family: PingFang-SC, PingFang-SC;
		font-weight: 500;
		font-size: 20rpx;
		color: #45C47B;
		margin-right: 10rpx;
		margin-top: 12rpx;
	}
	.tag1{
		color: #E3432D;
		background:rgba(227, 67, 45, .1);
	}
	
}
</style>